const mock = require('mockjs')
const Random = mock.Random

module.exports = [
    {
        url: '/api/user/info',
        method: 'get',
        response() {
            return {
                error: 0,
                data: {
                    username: Random.cname(),
                    nickname: Random.cname()
                },
                msg: 'success'
            }
        }
    },
    {
        url: '/api/user/register',
        method: 'post',
        response() {
            return {
                error: 0,
                msg: 'success'
            }
        }
    },
    {
        url: '/api/user/login',
        method: 'post',
        response() {
            return {
                error: 0,
                data: {
                    token: Random.word(20)
                },
                msg: 'success'
            }
        }
    }
]
